With increasing development of high technology industries, diverse electronic devices have experienced great growth. Especially, the electronic devices that can be used in our daily lives are now rapidly gaining in popularity, for example personal computers, mobile phones or image pickup devices. In order to achieve high image quality of the object, an auto focus method or a manual focus method is employed to adjust the focal length of the image pickup device. Generally, regardless of whether the auto focus method or a manual focus method is employed, a human visual recognition process or another image analysis process is utilized to discriminate whether the image pickup device accurately focuses on the object. For example, in a case that the image pickup device is a digital camera, the captured image of the object may be directly shown on the LCD screen of the digital camera and thus the user may discriminate the focusing efficacy with the naked eyes. On the other hand, after the image pickup devices are manufactured in the factory, the quality of the image pickup devices need to be tested. Since a huge number of image pickup devices are produced in the factory, the human visual recognition is both laboring and time-consuming. In addition, the human visual recognition is a very subjective because the naked eyes are readily tired after an extended use period. For efficiently discriminating focus quality of a large amount of image pickup devices, many image analysis techniques have been provided for the extraction of quantitative data from images.
Conventionally, there are several means for implementing focus value measurements. Take a histogram equalization method for example. By the histogram equalization method, the brightness values of the image are collected in terms of statistics, the probabilities of respective brightness values are plotted as a cumulative conversion curve, and the converted brightness values are obtained according to the cumulative conversion curve. FIG. 1 is an ideal curve plot for discriminating focus quality of an image pickup device according to the conventional histogram equalization method. The horizontal coordinate and the vertical coordinate denote brightness values and the pixel numbers, respectively. As shown in FIG. 1, since the horizontal coordinate at the right side is larger than that in the left side, the right-side horizontal coordinates are relatively brighter but the left-side horizontal coordinates are relatively darker. As shown in FIG. 1, the maximum pixel number (Bmax) in the relatively darker region and the maximum pixel number (Wmax) in the relatively brighter region correspond to brightness values IPB and IPW, respectively.
According to the brightness values of IPB and IPW, a focus coefficient CF is obtained by the equation: CF=(IPW−IPB)/(IPW+IPB).
In addition, the histogram equalization method has a predetermined standard focus coefficient CS. The histogram equalization method may discriminate whether the image pickup device accurately focus on the object by comparing the standard focus coefficient CS with the focus coefficient CF. If the focus coefficient CF is more than or equal to the standard focus coefficient CS, the image pickup device is deemed to accurately focus on the object. Whereas, if the focus coefficient CF is less than the standard focus coefficient CS, the focusing accuracy of the image pickup device is deteriorated and thus the focus quality is undesirable.
Since the histogram equalization method as shown in FIG. 1 is implemented by an image processing program, the focusing accuracy is usually affected by the environmental variables or some other factors in the practical operating situations. FIG. 2 is a real curve plot for discriminating focus quality of an image pickup device according to the conventional histogram equalization method. As shown in FIG. 2, the maximum pixel number (Wmax) in the relatively brighter region corresponds to brightness value of IPW. Whereas, in the relatively darker region, two peak pixel numbers having the same pixel number Bmax are obtained. Since these two peak pixel numbers having the same pixel number Bmax correspond to the brightness values IPB and IPB′, the image processing program fails to realize which brightness value is chosen to determine the focus coefficient CF. Moreover, since the brightness values of the pixels are influenced by the background light, the pixel umber Bmax corresponding to the brightness value IPB is possibly shifted to the adjacent pixel number Bmax+1 or Bmax−1. Under this circumstance, if the brightness value IPB corresponds to the pixel number Bmax−1, the image processing program may acquire the brightness value IPB to calculate the focus coefficient CF. Otherwise, if the brightness value IPB corresponds to the pixel number Bmax+1, the image processing program may acquire the brightness value IPB to calculate the focus coefficient CF. Therefore, the focus coefficient CF is usually erroneous and unreliable.